package com.cy5;

import java.util.Objects;

/**
 * 1
 *
 * @author CY
 * @date 2022/08/04 00:45
 **/

public class Test {
    private Integer age;
    private String name;

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Test{" + "age=" + age + ", name='" + name + '\'' + '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Test test = (Test)o;
        return age.equals(test.age) && name.equals(test.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(age, name);
    }
}
